{% extends 'layout.html' %}


{% block content %}


    <div style="padding: 20px">
        <a href="{% url 'rbac:role_add' %}" class="btn btn-sm btn-success">新建</a>

        <table class="table-hover table table-bordered" style="margin-top: 20px">

            <thead>
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for role in all_roles %}
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ role.name }}</td>
                    <td>
                        <a href="{% url 'rbac:role_edit' role.pk %}" class="btn btn-sm btn-success">编辑</a>
                        <a href="" class="btn btn-sm btn-danger">删除</a>

                    </td>
                </tr>
            {% endfor %}

            </tbody>
        </table>

    </div>


{% endblock %}